package com.smallerp.domain;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToMany;

@Entity
public class MyGroup {
	private int groupid;
	private String groupName;
	private String groupdetail;
	private Set<Employee> employees=new HashSet<Employee>();
	@ManyToMany(mappedBy="groups",cascade={CascadeType.ALL})
	public Set<Employee> getEmployees() {
		return employees;
	}
	public String getGroupdetail() {
		return groupdetail;
	}
	@Id
	@GeneratedValue
	public int getGroupid() {
		return groupid;
	}
	public String getGroupName() {
		return groupName;
	}
	public void setEmployees(Set<Employee> employees) {
		this.employees = employees;
	}
	public void setGroupdetail(String groupdetail) {
		this.groupdetail = groupdetail;
	}
	public void setGroupid(int groupid) {
		this.groupid = groupid;
	}
	public void setGroupName(String groupName) {
		this.groupName = groupName;
	}
}
